import React, { Component } from 'react';
import { connect } from 'react-redux';
import {
  Switch,
  Route
} from 'react-router-dom';

import ServsBar from '../leftbar/service';
import ServiceAdd from '../servs/add';

import { URL } from '../../config';

class App extends Component {
  render () {
    return (
      <div>
        <div className="drawer_nav">
          <ServsBar />
        </div>
        <div className="item_box">
          <Switch>
            <Route path={URL.addserv_page} component={ServiceAdd} />
            <Route path={URL.editserv_page} component={ServiceAdd} />
          </Switch>
        </div>
      </div>
    )
  }
}

function mapStateToProps (state) {
  return {
  }
}

export default connect(mapStateToProps)(App);